#ifndef COMMONHDR_H
#define COMMONHDR_H

#include <string>
#include <sstream>

#define WORK_THREAD_EXIT_KEY -1

#define UNINITIALIZE_FILE_SIZE_INDEX -1

#define CLIENTCONTEXT_BUFFER_SIZE 4096

#define chSTR2(x) #x
#define chSTR(x)  chSTR2(x)
#define chMSG(desc) message(__FILE__ "(" chSTR(__LINE__) "):" #desc)

#ifdef UNICODE
#define TString std::wstring
#define TChar wchar_t
#define TStringStream std::wistringstream
#else
#define TString std::string
#define TChar char
#define TStringStream std::istringstream
#endif

#endif